package com.henvc.thread;

import java.util.Timer;
import java.util.TimerTask;

class EatTimberTask extends TimerTask{
	@Override
	public void run() {
		System.out.println("Eat");
	}
}
public class TimerDemo {

	public static void main(String[] args) {
		
        EatTimberTask task = new EatTimberTask();
        Timer timer = new Timer();
        timer.schedule(task,0,1000);    
	}

}

